﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<TITLE> <? echo $title;?> </TITLE>
<base href="<?php echo base_url() ?>" />
<LINK href="images/default_1.css" type="text/css" rel=stylesheet>
<SCRIPT src="js/common.js" type="text/javascript"></SCRIPT>
<SCRIPT src="js/jquery.min.js" type="text/javascript"></SCRIPT>
<script src="js/jquery.form.js" type="text/javascript"></script>
<SCRIPT type="text/javascript">
<!--
$(function(){
    var options = {
		target:     '#msgs', //结果显示目标
    	url:        '<?php echo site_url("main/savePwd") ?>', //action目标
		beforeSubmit: function(){
                        if($('#old').val()==''){
							$('#msgs').html("<span class=\"about_content_title\">[原始密码]不能为空!</span>");
							$('#msgs').show(1000);
							$('#msgs').hide(3000);
                            $('#old').focus();
							return false;
						}

						if($('#password').val()==''){
							$('#msgs').html("<span class=\"about_content_title\">[新密码]不能为空!</span>");
							$('#msgs').show(1000);
							$('#msgs').hide(3000);
                            $('#password').focus();
							return false;
						}

						if($('#password2').val()==''){
							$('#msgs').html("<span class=\"about_content_title\">[确认新密码]不能为空!</span>");
							$('#msgs').show(1000);
							$('#msgs').hide(3000);
                            $('#password2').focus();
							return false;
						}
                      	if($('#password').val()!=$('#password2').val()){
							$('#msgs').html("<span class=\"about_content_title\">两次密码输入不一致!</span>");
							$('#msgs').show(1000);
							$('#msgs').hide(3000);
                            $('#password').val("");
                            $('#password2').val("");
                            $('#password').focus();
							return false;
						}
                        $("#submit").attr('value','正在提交...');
                        $(":input") .attr('disabled', true) ;
						$('#msgs').html("<img src=\"images/loading.gif\" /><span class=\"about_content_title\"> 资料正在提交，请稍候。。。</span>");
    					$('#msgs').show(1000);
					},
    	success:    function() {
                       $(":input") .attr('disabled', false);
                       $("#submit").attr('value','修 改');
                       $('#msgs').show(1000);
    				}
    };
    $('#myform').ajaxForm(options);
});
-->
</SCRIPT>
</HEAD>
<BODY topMargin=10>
<TABLE cellSpacing=6 cellPadding=2 width="100%" border=0>
  <TBODY>
  <TR>
    <TD>
      <TABLE class=guide cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD><A href="<?php echo site_url("admin/info"); ?>" target="main">系统首页</A>&nbsp;» 密码修改</TD>
        </TR></TBODY></TABLE>
      <BR>
       <FORM id="myform" name="myform" method="post">
        <table class="tableborder" width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr class="header">
          <td colspan="2">密码修改</td>
        </tr>
        <tr>
          <td width="100">原始密码：            </td>
          <td><input type="password" name="old" id="old"></td>
        </tr>
        <tr>
          <td>新密码：            </td>
          <td><input type="password" name="password" id="password"></td>
        </tr>
        <tr>
          <td>确认新密码：            </td>
          <td><input type="password" name="password2" id="password2"></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td><input class="submit" type=submit value="修 改" name=submit>
            <input id="reset" type="button"value="清除全部" name="reset" onclick=" $('#myform').clearForm(); $('#old').focus();">
          </td>
        </tr>
        <tr>
          <td></td>
          <td > 
          <div id="msgs" style="margin-top:12px;margin-bottom:5px;font-size:13px;color: #C62E25;font-weight:bold;"></div>
          </td>
       </tr>
      </table>
      </FORM></TD></TR></TBODY></TABLE><BR><BR>
      <br/><br/>
      <DIV class=footer>
        <HR width="80%" color=#9db3c5 noShade SIZE=0>
         Powered by <? echo $copyright ?> <em>,</em> <B><A style="COLOR: #666" href="<? echo base_url() ?>" target="_blank"><? echo $version;?>.</A></B>
      </DIV>
</BODY></HTML>
